﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace NETCORE.Consul.Service.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class PenController : ControllerBase
    { 
        //测试接口
        [Route("GetPenInfo")]
        [HttpGet]
        public string GetPenInfo()
        {
            Task.Run(() => { Console.WriteLine($" get a new pen , Host: {0}", HttpContext.Request.Host.Value); });
            return "success! get a new pen !";
        }
    }
}
